from django.shortcuts import render
from datetime import datetime
def greet(word):
    return 'hello{}'.format(word)

def index(request):
    context = {
        'greet': greet
    }
    return render(request,'index.html',context=context)

def add_demo(request):
    context = {
        'values1' : ['1','2','3'],
        'values2' :['4','5','6']
    }
    return render(request,'add_demo.html',context=context)

def cut_demo(request):
    return render(request,'cut_demo.html')

def date_demo(request):
    context = {
        "today":datetime.now

    }
    return render(request, 'date_demo.html',context=context)
#自定义过滤器
def filtmd(request):
    strs = 'abcdef'
    return render(request ,'add_demo.html',{'strs':strs})